<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
                                                
  <meta http-equiv="Content-Type"
 content="text/html; charset=iso-8859-1">
                                                
  <meta http-equiv="CONTENT-TYPE"
 content="text/html; charset=iso-8859-1">
                                                
  <meta name="GENERATOR"
 content="Mozilla/4.78 [en] (X11; U; SunOS 5.9 sun4u) [Netscape]">
                                                
  <meta name="AUTHOR" content="Paulo Bulhoes">
                                                
  <meta name="CREATED" content="20020930;11225800">
                                                
  <meta name="CHANGEDBY" content="Paulo Bulhoes">
                                                
  <meta name="CHANGED" content="20021011;16301500">
                                             
  <style>
	<!--
		@page { size: 8.5in 11in; margin-left: 1.25in; margin-right: 1.25in; margin-top: 1in; margin-bottom: 1in }
	-->
	</style>
  <title></title>
</head>
  <body text="#000000" bgcolor="#ffffff" link="#0000ee" vlink="#551a8b"
 alink="#ff0000" lang="en-US">
                        
<div style="margin-bottom: 0in;">        
<h1><b><font size="+2">Using Solaris</font><font size="-1"><sup>TM</sup></font><font
 size="+2"> 9 Resource Manager software with </font><font size="+2">Grid
   Engine software.</font></b></h1>
        </div>
                              
<div style="margin-bottom: 0in;"><b><br>
           <br>
           What is Solaris 9 Resource Manager software?</b></div>
                         
<p style="margin-bottom: 0in;">Solaris 9 Resource Manager software is    
a new set of features designed to enhance resource control and accounting
      on the Solaris<font size="-1"><sup>TM</sup></font> Operating Environment 
     (Solaris OE). Detailed information about it can be found in the Solaris<font
 size="-1"><sup>TM</sup></font> 9 Operating Environment documentation set. 
    <br>
         </p>
                  
<p style="margin-bottom: 0in;">Here are some related links: <br>
      </p>
           
<p style="margin-bottom: 0in;">   FAQ: <a
 href="http://wwws.sun.com/software/solaris/faqs/resource_manager.html">http://wwws.sun.com/software/solaris/faqs/resource_manager.html</a>.<br>
      </p>
           
<p style="margin-bottom: 0in;"> Overview: <a
 href="http://wwws.sun.com/software/solaris/ds/ds-srm/">http://wwws.sun.com/software/solaris/ds/ds-srm/</a>,
    <br>
      </p>
           
<p style="margin-bottom: 0in;">  Solaris 9 Resource Manager manual: <a
 href="http://docs.sun.com/db/doc/806-4076/6jd6amqor?q=Solaris+9+resource+Manager&amp;a=view">http://docs.sun.com/db/doc/806-4076/6jd6amqor?q=Solaris+9+resource+Manager&amp;a=view</a>.<br>
      </p>
           
<p style="margin-bottom: 0in;"> Sun Blue Prints: <a
 href="http://www.sun.com/solutions/blueprints/0902/816-7753-10.pdf">http://www.sun.com/solutions/blueprints/0902/816-7753-10.pdf</a><br>
       </p>
             
<p style="margin-bottom: 0in;">Two papers on this subject were  presented 
 at Sun's <a
 href="http://www.sun.com/datacenter/superg/san_francisco/agenda.html">SuperG 
   2002</a> conference.  </p>
                     
<p style="margin-bottom: 0in;"><b><br>
           What are the benefits?</b>  </p>
                     
<p style="margin-bottom: 0in;">It can be used to generate detailed accounting
      information, to better enforce limits in a job and to prevent a job
from   using  more CPUs than requested.  </p>
                     
<p style="margin-bottom: 0in;"><b><br>
           How to use it?</b>  </p>
                     
<p style="margin-bottom: 0in;">Before you start, set up the projects database
      and extended accounting facility. &nbsp;Please refer to the Solaris
OE documentation for detailed setup    instructions.   </p>
                     
<p style="margin-bottom: 0in;">The key is to associate each job to a <i>taskid</i> 
 of Solaris     9 Resource Manager software. To do this, run <font
 face="Courier, sans-serif">newtask</font> at job start up, either on the 
     starter method or on the prolog.  </p>
                     
<p style="margin-bottom: 0in;">The starter method is simpler; since it <font
 face="Courier, sans-serif">exec</font>s the end user    script. An example 
 of a starter method is: </p>
                     
<div style="margin-bottom: 0in;">      
<p><font face="Courier New, Courier, monospace">exec /usr/bin/newtask $SGE_STARTER_SHELL_PATH
  &nbsp;$*</font></p>
      </div>
                                    
<div style="margin-bottom: 0in;">      
<p>A sample starter method is provided in <a href="#Appendix:_E">Appendix
   E</a>.</p>
      </div>
                        
<div style="margin-bottom: 0in;">     
<p> </p>
         
<p>The advantage of using the queue/host prolog is that  it can be run as
   <font face="Courier, sans-serif">root</font>; and thus perform  privileged 
 operations    without the need of <font face="Courier, sans-serif">setuid</font> 
 helper    programs. On the other hand,  the prolog process does not <font
 face="Courier New, Courier, monospace">exec</font> the user script. To make 
 the changes  "stick" you have to change the <i>taskid</i> of the shepherd
  process instead  of the prolog's process:</p>
         
<p> </p>
     </div>
                                        
<p style="margin-bottom: 0in;"><font face="Courier, sans-serif">newtask -c 
     `ps -o ppid= -p $$`</font> <a href="#Minimal%20Prolog">(<b><font
 color="#009900">CORRECT:</font></b> changes the shepherd's <i>taskid</i>)</a>.
       </p>
                     
<p style="margin-bottom: 0in;">Once the shepherd has the new <i>taskid</i>
      the starter method, user script and epilog script will inherit  the
 proper <i>taskids</i> from the shepherd.  </p>
                     
<p style="margin-bottom: 0in;"><b><br>
           Projects</b>  </p>
                     
<p><b>Note</b>: The Sun<sup>TM</sup> ONE Grid Engine,    <font
 face="Times-Roman">Enterprise</font> Edition software has projects,   but
   for this document, only the Solaris 9 Resource Manager software concept
   of projects will be used.  </p>
                     
<p style="margin-bottom: 0in;"><font face="Courier, sans-serif">newtask</font>
      can be used to create a new <i>taskid</i> as well as&nbsp; bill the
job to a project.     To do this, use the <font
 face="Courier, sans-serif">-p &lt;&lt;project   name&gt;&gt;</font> flag
on the <font face="Courier, sans-serif">newtask</font>   command line inside
the starter method or prolog script.  </p>
                     
<p style="margin-bottom: 0in;">You can have resource pools associated with
      a project; therefore, billing the job to a project will also bind it 
 to  the associated resource pool.  </p>
                     
<p style="margin-bottom: 0in;"><b><br>
           Resource Pools</b>  </p>
                     
<p style="margin-bottom: 0in;">There are two ways of using resource pools
      with jobs: (1) associate a resource pool to a project and use this
   project on the <font face="Courier, sans-serif">newtask</font> call. (2) 
 use the <font face="Courier, sans-serif">poolbind</font>  command and explicitly 
 bind the job to a resource pool. The <font face="Courier, sans-serif">poolbind</font> 
 command requires <font face="Courier, sans-serif">root</font> privileges 
and should be used on the queue's prolog or be called from the starter method 
 through a <font face="Courier, sans-serif">setuid</font> wrapper.  </p>
                     
<p style="margin-bottom: 0in;">The prolog example on <a
 href="#Fancier%20Prolog">Appendix B</a>, uses the <font
 face="Courier, sans-serif">poolbind</font> method. Resource pools can be 
     used to limit the number of CPUs a job can use; therefore, a grid administrator 
   can  block a multithreaded program to use more CPUs than requested. Note 
  that if a parallel job is bound to a resource pool with less CPUs than given
  by the <font face="Courier, sans-serif">PARALLEL</font> environment variable,
    the parallel job will severely slow down.  </p>
                     
<p style="margin-bottom: 0in;"><b><br>
           Resource controls</b>  </p>
                     
<p style="margin-bottom: 0in;">At this point resource controls do not offer
      much new functionality to the Grid Engine software.&nbsp; However,
you    can use resource controls to enforce CPU time limits and Light Weight
Process     (LWP) limits on a job, by using the <font
 face="Courier, sans-serif">prctl</font>   command on the prolog or start
method to set the job's resource controls.  &nbsp;The prolog in <a
 href="#Fancier%20Prolog">Appendix B</a> illustrates  the usage of <tt>prctl</tt>.
   </p>
                     
<p style="margin-bottom: 0in;"><b><br>
           How do I get an <font face="Courier, sans-serif">exacct</font> 
report?</b>       </p>
                     
<p style="margin-bottom: 0in;">There are no reporting tools for <font
 face="Courier, sans-serif">exacct</font> at this time. Only the C API and 
 a demo program that prints all the <font
 face="Courier New, Courier, monospace">exacct</font> records from a file 
 is available. The demo program    in C is in the <font
 face="Courier, sans-serif">SUNWosdem</font> package   and is usually installed 
 at <font face="Courier, sans-serif">/usr/demo/libexacct.</font>     You will
 need to compile it before you use it.  </p>
                     
<p style="margin-bottom: 0in;">I wrote a simple tool that scans the exacct
      file that keeps track of processes and prints selected parts of the
process      records that used more than 0.5 seconds of CPU time. You can
download   this  tool <a href="proclist.c">here</a>.  </p>
                     
<p style="margin-bottom: 0in; page-break-before: always;"><br>
      <b>Limitations<br>
       </b></p>
             
<p style="margin-bottom: 0in; page-break-before: always;">The setup presented 
   here only works for BATCH queues. &nbsp; <br>
       </p>
             
<p style="margin-bottom: 0in; page-break-before: always;">Interactive loads 
   have to be controlled by projects because the <font
 face="Courier New, Courier, monospace">in.rlogind</font> starts a new task 
   for the login session, ignoring the task created by the starter method 
or   prolog.<br>
       </p>
             
<p style="margin-bottom: 0in; page-break-before: always;">Parallel Environments 
   are not covered in this HOWTO.<br>
       </p>
             
<p style="margin-bottom: 0in; page-break-before: always;"><b><br>
           Appendix: A</b>  </p>
                     
<p style="margin-bottom: 0in; page-break-before: always;"><a
 name="Minimal Prolog"></a><b>Minimal Prolog</b>  </p>
                     
<p style="margin-bottom: 0in;">The following is a minimal prolog script to 
 assign a     <i>taskid</i> to a job; &nbsp;You can download it <a
 href="s9rm_prolog_minimal.sh">here</a>.     </p>
                <font face="Courier, sans-serif"><font size="-1"><br>
     <br>
     === Minimal prolog ===</font></font>            
<div style="margin-bottom: 0in;"><font face="Courier, sans-serif"><font
 size="-1"></font></font></div>
                        
<div style="margin-bottom: 0in; page-break-before: always;"><tt>#!/bin/sh<br>
     # (c) 2002 Sun Microsystems, Inc. Use is subject to license terms.<br>
 # Copyright &copy; 2002 Sun Microsystems, Inc.&nbsp; All rights reserved.<br>
 </tt><tt>    #****** s9rm_prolog_minimal.sh *********************************************<br>
     #<br>
     #&nbsp; NAME<br>
     #&nbsp;&nbsp;&nbsp;&nbsp; s9rm_prolog_minimal.sh -- prolog to associate
  a job with a Solaris 9<br>
     #&nbsp;&nbsp;&nbsp;&nbsp; Resource Manager task.<br>
     #<br>
     #&nbsp; SYNOPSIS<br>
     #&nbsp;&nbsp;&nbsp;&nbsp; s9rm_prolog_minimal.sh <br>
     #<br>
     #&nbsp; FUNCTION<br>
     #&nbsp;&nbsp;&nbsp;&nbsp; This script can be used as prolog in sge_queue(5), 
  to create<br>
     #&nbsp;&nbsp;&nbsp;&nbsp; a new taskid for the job.<br>
     # <br>
     #&nbsp; NOTES<br>
     #&nbsp;&nbsp;&nbsp;&nbsp; The /usr/bin/newtask command is not available
  before Solaris 8.<br>
     #<br>
     #***************************************************************************<br>
     if [ ! -x /usr/bin/newtask ]<br>
     then<br>
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "Warning: /usr/bin/newtask 
  is not available, skipping Solaris 9 Resource Manager setup." <br>
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit 0<br>
     fi<br>
     ####<br>
     ####&nbsp; The line below creates a new task for this job.<br>
     ####<br>
     <b>/usr/bin/newtask -c `/bin/ps -o ppid= -p $$`</b><br>
     ####<br>
     exit 0<br>
     #### ### ### End of the prolog ### ### ###</tt><font
 face="Courier, sans-serif"><font size="-1"><br>
     === Minimal prolog ===</font></font><br>
     <b>      <br>
           Appendix: B</b></div>
                         
<p style="margin-bottom: 0in; page-break-before: always;"><a
 name="Fancier Prolog"></a><b>Fancier Prolog</b>  </p>
                     
<p style="margin-bottom: 0in;">Here is an example of a fancier prolog    
script. &nbsp;It creates a new <i>taskid</i>, assigns it to the job,  sets 
 resource controls, and binds the job to a resource pool. You can download 
    it <a href="s9rm_prolog_single.sh">here</a>.     </p>
                     
<p style="margin-bottom: 0in;">== fancy prolog ===<br>
     </p>
     <tt>#!/bin/sh<br>
   </tt><tt># Copyright &copy; 2002 Sun Microsystems, Inc.&nbsp; All rights 
reserved.</tt><tt><br>
 # (c) 2002 Sun Microsystems, Inc. Use is subject to license terms.<br>
   #****** util/resources/s9rm_prolog.sh ***************************************<br>
   #<br>
   #&nbsp; NAME<br>
   #&nbsp;&nbsp;&nbsp;&nbsp; s9rm_prolog.sh -- Prolog to set up Solaris 9 
Resource  Manager<br>
   #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resource control and accounting.<br>
   #<br>
   #&nbsp; SYNOPSIS<br>
   #&nbsp;&nbsp;&nbsp;&nbsp; s9rm_prolog.sh<br>
   #<br>
   #&nbsp; FUNCTION<br>
   #&nbsp;&nbsp;&nbsp;&nbsp; This script can be used as prolog in sge_queue(5). 
 It creates<br>
   #&nbsp;&nbsp;&nbsp;&nbsp; a new taskid for the job, sets the user's default 
 project as projid,<br>
   #&nbsp;&nbsp;&nbsp;&nbsp; sets resource controls, and binds the job to 
a  resource pool.<br>
   #&nbsp;&nbsp;&nbsp;&nbsp; If some of this functionality is not desired,
 comment out the<br>
   #&nbsp;&nbsp;&nbsp;&nbsp; respective commands.<br>
   #<br>
   #&nbsp; NOTES<br>
   #&nbsp;&nbsp;&nbsp;&nbsp; The /usr/bin/newtask command is not available
 before Solaris 8.<br>
   #<br>
   #***************************************************************************<br>
   if [ ! -x /usr/bin/newtask ]<br>
   then<br>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "Warning: /usr/bin/newtask 
 is not available, skipping Solaris 9 res<br>
   ource Manager setup."<br>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit 0<br>
   fi<br>
   ####&nbsp; Get the shepherd's process id<br>
   SHEP_PID="`/bin/ptree $$ | awk 'BEGIN {getline; getline; print $1}'`"<br>
   ####<br>
   ##################################################################<br>
   ####<br>
   ####&nbsp; Setting the jobs' task and project ids<br>
   ####<br>
   ##################################################################<br>
   ####<br>
   ####&nbsp; The lines below get the user's default project name and id<br>
   ####&nbsp; You might want a fancier mapping of jobs/queues to projects<br>
   ####<br>
   PROLOG_DEFAULT_PROJECT="`/bin/projects -d ${USER}`"<br>
   PROLOG_PROJECT_ID="`grep $PROLOG_DEFAULT_PROJECT /etc/project| /usr/bin/awk 
 -F:<br>
   '{print $2}'`"<br>
   ####<br>
   ####&nbsp; The line below creates a new task for this job and assigns
it  to the<br>
   ####&nbsp; user's default project.<br>
   ####<br>
   <b>/usr/bin/newtask -p $PROLOG_DEFAULT_PROJECT -c $SHEP_PID</b><br>
   PROLOG_JOB_TASKID="`/bin/ps -o taskid= -p $SHEP_PID`"<br>
   ####<br>
   ##################################################################<br>
   ####<br>
   ####&nbsp; Binding the job to a resource pool<br>
   ####<br>
   ##################################################################<br>
   ####<br>
   PROLOG_POOL=single<br>
   PROLOG_MYTASK="`/bin/ps -o taskid= -p $$`"<br>
   <b>/usr/sbin/poolbind -p $PROLOG_POOL -i taskid $PROLOG_JOB_TASKID</b><br>
   ##################################################################<br>
   ####<br>
   ####&nbsp; Setting resource controls<br>
   ####<br>
   ##################################################################<br>
   ####<br>
   <b>/usr/bin/prctl -n task.max-lwps -v 9 -e signal=9 -i task $PROLOG_JOB_TASKID</b><br>
   ####<br>
   exit 0<br>
   ####<br>
   #### ### ### End of the prolog ### ### ##</tt><br>
         
<p>== fancy prolog ==</p>
                     
<div style="margin-bottom: 0in;">     
<p>To use this prolog in a queue, use the following command:</p>
     </div>
                         
<p style="margin-bottom: 0in;"><font face="Courier, sans-serif">qconf -mqattr
      prolog root@&lt;&lt;path to the prolog script&gt;&gt; &lt;&lt;queues&gt;&gt;</font>
       </p>
                     
<p style="margin-bottom: 0in;"><b><br>
        Appendix: C</b></p>
               
<p style="margin-bottom: 0in;">Here are the commands that will create three 
     resource pools in a 4 CPU machine. One pool is allocated to system resources 
     and the other two ("single",&nbsp; with 1 CPU and "dual" with 2 CPUs) 
 can be used by SGE   prologs. You can  download this file <a
 href="create_pools">here</a>.</p>
           
<p style="margin-bottom: 0in;"><font face="Courier, sans-serif"><font
 size="-1">create system mymachine</font></font>    </p>
                     
<div style="margin-bottom: 0in;"><font face="Courier, sans-serif"><font
 size="-1">create pset sys-procs (string pset.comment = "System Pset"; string 
     pool.scheduler = "TS" ;uint pset.min = 1; uint pset.max=1)</font></font></div>
                        
<div style="margin-bottom: 0in;"><font face="Courier, sans-serif"><font
 size="-1">create pool sys-procs (string pool.comment = "System resource pool")</font></font></div>
                        
<div style="margin-bottom: 0in;"><font face="Courier, sans-serif"><font
 size="-1">associate pool sys-procs (pset sys-procs)</font></font></div>
                        
<div style="margin-bottom: 0in;"><font face="Courier, sans-serif"><font
 size="-1">create pset single (string pset.comment = "SGE Pset"; string pool.scheduler 
     = "TS" ;uint pset.min = 1; uint pset.max=1)</font></font></div>
                        
<div style="margin-bottom: 0in;"><font face="Courier, sans-serif"><font
 size="-1">create pool single (string pool.comment = "SGE Resource Pool")</font></font></div>
                        
<div style="margin-bottom: 0in;"><font face="Courier, sans-serif"><font
 size="-1">associate pool single (pset single)</font></font></div>
                        
<div style="margin-bottom: 0in;"><font face="Courier, sans-serif"><font
 size="-1">create pset dual (string pset.comment = "SGE Pset"; string pool.scheduler 
     = "TS" ;uint pset.min = 2; uint pset.max=2)</font></font></div>
                        
<div style="margin-bottom: 0in;"><font face="Courier, sans-serif"><font
 size="-1">create pool dual (string pool.comment = "SGE Resource Pool")</font></font></div>
                        
<div style="margin-bottom: 0in;"><font face="Courier, sans-serif"><font
 size="-1">associate pool dual (pset dual)</font></font></div>
                              
<div style="margin-bottom: 0in;"><b><br>
        </b><b>   Appendix: D<br>
        </b><br>
        <b>Sample epilog</b></div>
             <br>
   Below is an <font face="Courier New, Courier, monospace">epilog</font> 
script  that runs the simple <tt>exacct</tt> report generator available <a
 href="proclist.c">here</a>. &nbsp;The <tt>epilog</tt> script can be downloaded
  <a href="s9rm_epilog.sh">here</a>.<br>
     <tt><br>
   #!/bin/sh<br>
 #&nbsp;(c) 2002 Sun Microsystems, Inc. Use is subject to license terms.<br>
 # Copyright &copy; 2002 Sun Microsystems, Inc.&nbsp; All rights reserved.<br>
 </tt><tt>  #****** util/resources/s9rm_epilog.sh ***************************************<br>
   #<br>
   #&nbsp; NAME<br>
   #&nbsp;&nbsp;&nbsp;&nbsp; s9rm_epilog.sh -- epilog to generate accounting 
 reports at<br>
   #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 the end of a job<br>
   #<br>
   #&nbsp; SYNOPSIS<br>
   #&nbsp;&nbsp;&nbsp;&nbsp; s9rm_epilog.sh<br>
   #<br>
   #&nbsp; FUNCTION<br>
   #&nbsp;&nbsp;&nbsp;&nbsp; This script can be used as epilog in sge_queue(5); 
 It runs a<br>
   #&nbsp;&nbsp;&nbsp;&nbsp; a program to generate a summary report from
the  job's exacct records.<br>
   #<br>
   #&nbsp; NOTES<br>
   #&nbsp;&nbsp;&nbsp;&nbsp; The /usr/bin/newtask command is not available
 before Solaris 8.<br>
   #&nbsp;&nbsp;&nbsp;&nbsp; Please set the EPILOG_SUMMARY variable to the
 path of report generator<br>
   #&nbsp;&nbsp;&nbsp;&nbsp; generator program before using this script.<br>
   #<br>
   #***************************************************************************<br>
   ####<br>
   #### Name the program that generates a summary of the<br>
   #### job's exacct records<br>
   ####<br>
   <b>EPILOG_SUMMARY=&lt;&lt;path to report generator&gt;&gt;/proclist</b><br>
   ####<br>
   ####<br>
   EPILOG_MYTASK="`/bin/ps -o taskid= -p $$`"<br>
   #### You might want to call newtask again here, to finish the previous 
task,<br>
   #### otherwise the exacct task record will not be available at this point<br>
   if [ -x $EPILOG_SUMMARY ]<br>
   then<br>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $EPILOG_SUMMARY<br>
   fi<br>
   ####</tt><br>
   <tt><br>
     <br>
     </tt>     
<div style="margin-bottom: 0in;">      
<p>To use this prolog in a queue, edit the variable <font
 face="Courier New, Courier, monospace">EPILOG_SUMMARY</font> to point to
  the proper path of proclist then use the following command:</p>
      </div>
                         
<p style="margin-bottom: 0in;"><font face="Courier, sans-serif">qconf -mqattr 
  epilog &lt;&lt;path to the prolog script&gt;&gt; &lt;&lt;queues&gt;&gt;</font>
       </p>
                <br>
   <br>
        <br>
          
<p><b><a name="Appendix:_E"></a>   Appendix: E</b><b><br>
  </b></p>
   
<p><b>      Sample Starter Method</b></p>
        <br>
            
<div style="margin-bottom: 0in;">      
<p>Simple starter_method, similar to the minimal prolog (available for download 
  <a href="s9rm_starter_method.sh">here</a>):<br>
     </p>
     <tt>#!/bin/sh<br>
 # (c) 2002 Sun Microsystems, Inc. Use is subject to license terms.<br>
 </tt><tt># Copyright &copy; 2002 Sun Microsystems, Inc.&nbsp; All rights 
reserved.</tt><tt><br>
 #****** s9rm_starter_method.sh *********************************************</tt><br>
     <tt>#</tt><br>
     <tt>#&nbsp; NAME</tt><br>
     <tt>#&nbsp;&nbsp;&nbsp;&nbsp; s9rm_starter_method.sh -- prolog to associate 
  a job with a Solaris 9</tt><br>
     <tt>#&nbsp;&nbsp;&nbsp;&nbsp; Resource Manager task.</tt><br>
     <tt>#</tt><br>
     <tt>#&nbsp; SYNOPSIS</tt><br>
     <tt>#&nbsp;&nbsp;&nbsp;&nbsp; s9rm_starter_method.sh</tt><br>
     <tt>#</tt><br>
     <tt>#&nbsp; FUNCTION</tt><br>
     <tt>#&nbsp;&nbsp;&nbsp;&nbsp; This script can be used as starter_method
  in sge_queue(5) to create</tt><br>
     <tt>#&nbsp;&nbsp;&nbsp;&nbsp; a new taskid for the job.</tt><br>
     <tt>#</tt><br>
     <tt>#&nbsp; NOTES</tt><br>
     <tt>#&nbsp;&nbsp;&nbsp;&nbsp; The /usr/bin/newtask command is not available 
  before Solaris 8.</tt><br>
     <tt>#</tt><br>
     <tt>#***************************************************************************</tt><br>
     <tt>if [ -x /usr/bin/newtask ]</tt><br>
     <tt>then</tt><br>
     <tt>&nbsp;&nbsp; SM_DEFAULT_PROJECT="`/bin/projects -d ${USER}`"</tt><br>
     <b><tt>&nbsp;&nbsp; exec /usr/bin/newtask -p $SM_DEFAULT_PROJECT $SGE_STARTER_SHELL_PATH 
  $*</tt></b><br>
     <tt>else</tt><br>
     <tt>&nbsp;&nbsp; echo "Warning: /usr/bin/newtask is not available, skipping 
  Solaris 9 Resource Manager s</tt><tt>etup."</tt><br>
     <tt>&nbsp;&nbsp; exec $SGE_STARTER_SHELL_PATH $*</tt><br>
     <tt>fi</tt><br>
     <tt>#### ### ### End of the starter_method ### ### ###</tt><br>
      </div>
           
<div style="margin-bottom: 0in;">     
<p> </p>
         
<p>To use this starter_method&nbsp; in a queueuse the following command:</p>
         
<p> </p>
     </div>
         
<p>                </p>
         
<p style="margin-bottom: 0in;"><font face="Courier, sans-serif">qconf -mqattr 
  starter_method &lt;&lt;path to the starter_method script script&gt;&gt; 
&lt;&lt;queues&gt;&gt;</font>      </p>
         
<p>            </p>
       
<p><b>Trademarks</b></p>
<p><br>
Copyright &copy; 2002 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
California 95054, U.S.A. All rights reserved.This distribution may include
materials developed by third parties. &nbsp; Sun, Sun Microsystems, Sun<font
 size="-2"><sup>TM</sup></font> ONE and Solaris are trademarks or registered
trademarks of Sun Microsystems,   Inc. in the United States and other countries.
&nbsp;<br>
</p>
<hr width="100%" size="2">
<p>By Paulo Tib&eacute;rio Muradas Bulh&otilde;es, November 2002.<b><br>
 </b></p>
 
<p><br>
  </p>
 
</body>
</html>
